from app.serve.wtrees.base import BaseModel
from sqlalchemy import Column, Integer, Index


class UserGroupModel(BaseModel):
    __tablename__ = "wtrees_user_group"
    __table_args__ = (Index("user_id_group_id", "user_id", "group_id"),)

    id = Column(Integer(), primary_key=True)
    user_id = Column(Integer(), nullable=False, comment="用户id")
    group_id = Column(Integer(), nullable=False, comment="分组id")
